home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 1 / PC Actual CD 01.iso / share / dos / graficos / plydat14.arj / SQUISH.PI < prev    next >
Encoding:
Text File  |  1992-04-05  |  3.3 KB  |  149 lines

  1. //
  2. // Demonstration of a squirming blob shape
  3. //
  4. // Polyray input file - Alexander Enzmann
  5. //
  6.  
  7. // Define the range of the animation
  8. start_frame  0
  9. end_frame    119
  10. total_frames 120
  11. outfile sqush
  12.  
  13. // Set up the camera
  14. viewpoint {
  15.    from <0,3,-20>
  16.    at <0,0,0>
  17.    up <0,1,0>
  18.    angle 45
  19.    resolution 160, 160
  20.    }
  21.  
  22. // Set up background color & lights
  23. background skyblue
  24. bounding_slab <1, 0, 0>
  25. bounding_slab <0, 1, 0>
  26. bounding_slab <0, 0, 1>
  27. light <-10,20,-50>
  28. light < 10,20,-50>
  29.  
  30. include "colors.inc"
  31.  
  32. // Give the (time dependent) location of the blob points
  33. define ang radians(6 * frame)
  34.  
  35. define r10 1
  36. define r11 1
  37. define r20 2
  38. define r21 1
  39. define r30 2
  40. define r31 3
  41. define r40 3
  42. define r41 4
  43. define r50 4
  44. define r51 1
  45. define r60 1
  46. define r61 3
  47. define r70 2
  48. define r71 2
  49. define r80 3
  50. define r81 5
  51.  
  52. define s1 3
  53. define s2 2
  54. define s3 1.5
  55. define s4 1
  56. define s5 3
  57. define s6 2
  58. define s7 1.5
  59. define s8 1
  60. define s09 2
  61. define s10 1.5
  62. define s11 3
  63. define s12 1.5
  64. define s13 2
  65. define s14 3
  66. define s15 2
  67. define s16 1.5
  68. define s17 1
  69.  
  70. define r09x 3
  71. define r09y 2
  72. define r09z 1
  73. define r10x 1
  74. define r10y 2
  75. define r10z 1
  76. define r11x 2
  77. define r11y 0.5
  78. define r11z 3
  79. define r12x 5
  80. define r12y 0
  81. define r12z 0
  82. define r13x 3
  83. define r13y 3
  84. define r13z 3
  85. define r14x 4
  86. define r14y 0
  87. define r14z 1
  88. define r15x 0
  89. define r15y 0
  90. define r15z 4
  91. define r16x 0
  92. define r16y 3
  93. define r16z 0.5
  94.  
  95. define o09 radians(0)
  96. define o10 radians(192)
  97. define o11 radians(15)
  98. define o12 radians(20)
  99. define o13 radians(117)
  100. define o14 radians(300)
  101. define o15 radians(270)
  102. define o16 radians(90)
  103.  
  104. // Define the positions of the various spheres
  105. define loc1 < r10 * cos(s1*ang), 0, r11 * sin(s1*ang)>
  106. define loc2 < r20 * cos(s2*ang), 0, r21 * sin(s2*ang)>
  107. define loc3 < r30 * cos(s3*ang), 0, r31 * sin(s3*ang)>
  108. define loc4 < r40 * cos(s4*ang), 0, r41 * sin(s4*ang)>
  109. define loc5 < r50 * cos(s5*ang), r51 * sin(s5*ang), 0>
  110. define loc6 < r60 * cos(s6*ang), r61 * sin(s6*ang), 0>
  111. define loc7 < r70 * cos(s7*ang), r71 * sin(s7*ang), 0>
  112. define loc8 < r80 * cos(s8*ang), r81 * sin(s8*ang), 0>
  113.  
  114. define loc09 <r09x*cos(s09*ang+o09),r09y*cos(s09*ang+o09),r09z*cos(s09*ang+o09)>
  115. define loc10 <r10x*cos(s10*ang+o10),r10y*cos(s10*ang+o10),r10z*cos(s10*ang+o10)>
  116. define loc11 <r11x*cos(s11*ang+o11),r11y*cos(s11*ang+o11),r11z*cos(s11*ang+o12)>
  117. define loc12 <r12x*cos(s12*ang+o12),r12y*cos(s12*ang+o12),r12z*cos(s12*ang+o12)>
  118. define loc13 <r13x*cos(s13*ang+o13),r13y*cos(s13*ang+o13),r13z*cos(s13*ang+o13)>
  119. define loc14 <r14x*cos(s14*ang+o14),r14y*cos(s14*ang+o14),r14z*cos(s14*ang+o14)>
  120. define loc15 <r15x*cos(s15*ang+o15),r15y*cos(s15*ang+o15),r15z*cos(s15*ang+o15)>
  121. define loc16 <r16x*cos(s16*ang+o16),r16y*cos(s16*ang+o16),r16z*cos(s16*ang+o16)>
  122.  
  123. //
  124. // Using the multiple point locations, over time this makes a squirming blob
  125. //
  126. object {
  127.    blob 0.4:
  128.       0.2, 3.0, loc1,
  129.       0.2, 3.0, loc2,
  130.       0.2, 3.0, loc3,
  131.       0.2, 3.0, loc4,
  132.       0.2, 3.0, loc5,
  133.       0.2, 3.0, loc6,
  134.       0.2, 3.0, loc7,
  135.       0.2, 3.0, loc8,
  136.       0.2, 3.0, loc09,
  137.       0.2, 3.0, loc10,
  138.       0.2, 3.0, loc11,
  139.       0.2, 3.0, loc12,
  140.       0.2, 3.0, loc13,
  141.       0.2, 3.0, loc14,
  142.       0.2, 3.0, loc15,
  143.       0.2, 3.0, loc16
  144.    root_solver Ferrari
  145.    u_steps 20
  146.    v_steps 20
  147.    shiny_red
  148.    }
  149.